import 'package:flutter/material.dart';
import 'dart:async';
import '../route/PPRoutesPath.dart';

abstract class PPBaseWidget {

    final Map<String, String> ppRoutesPath = PPRoutesPath.routesPath;

    getDataFromJSONFile(BuildContext context, String fileName) {
        Future<String> loadString = DefaultAssetBundle.of(context).loadString(fileName);
        loadString.then((String value){
            print(fileName + " === " + value);
        });
    }

    double getReleateheight(BuildContext context, double h) {
        double relateH = h * MediaQuery.of(context).size.width / 375.0;
        return relateH;
    }

    double getScreenWidth(BuildContext context) {
        return MediaQuery.of(context).size.width;
    }
}
